<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>yadis.test.test_xrires</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="yadis-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.openidenabled.com/yadis/">Python-Yadis</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="yadis-module.html">Package&nbsp;yadis</a> ::
        <a href="yadis.test-module.html">Package&nbsp;test</a> ::
        Module&nbsp;test_xrires
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="yadis.test.test_xrires-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="yadis.test.test_xrires-module.html">Module yadis.test.test_xrires</a></h1>
<pre class="py-src">
<tt class="py-lineno"> 1</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">unittest</tt> <tt class="py-keyword">import</tt> <tt class="py-name">TestCase</tt> </tt>
<tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package yadis=yadis-module.html"><a title="yadis" class="py-name" href="#" onclick="return doclink('link-0', 'yadis', 'link-0');">yadis</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module yadis.xrires=yadis.xrires-module.html"><a title="yadis.xrires" class="py-name" href="#" onclick="return doclink('link-1', 'xrires', 'link-1');">xrires</a></tt></tt> </tt>
<tt class="py-lineno"> 4</tt>  <tt class="py-line"> </tt>
<a name="ProxyQueryTestCase"></a><div id="ProxyQueryTestCase-def"><tt class="py-lineno"> 5</tt> <a class="py-toggle" href="#" id="ProxyQueryTestCase-toggle" onclick="return toggle('ProxyQueryTestCase');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="yadis.test.test_xrires.ProxyQueryTestCase-class.html">ProxyQueryTestCase</a><tt class="py-op">(</tt><tt class="py-base-class">TestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ProxyQueryTestCase-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="ProxyQueryTestCase-expanded"><a name="ProxyQueryTestCase.setUp"></a><div id="ProxyQueryTestCase.setUp-def"><tt class="py-lineno"> 6</tt> <a class="py-toggle" href="#" id="ProxyQueryTestCase.setUp-toggle" onclick="return toggle('ProxyQueryTestCase.setUp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.test_xrires.ProxyQueryTestCase-class.html#setUp">setUp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ProxyQueryTestCase.setUp-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ProxyQueryTestCase.setUp-expanded"><tt class="py-lineno"> 7</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy_url</tt> <tt class="py-op">=</tt> <tt class="py-string">'http://xri.example.com/'</tt> </tt>
<tt class="py-lineno"> 8</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name"><a title="yadis.xrires" class="py-name" href="#" onclick="return doclink('link-2', 'xrires', 'link-1');">xrires</a></tt></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Class yadis.xrires.ProxyResolver=yadis.xrires.ProxyResolver-class.html"><a title="yadis.xrires.ProxyResolver" class="py-name" href="#" onclick="return doclink('link-3', 'ProxyResolver', 'link-3');">ProxyResolver</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy_url</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno"> 9</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicetype</tt> <tt class="py-op">=</tt> <tt class="py-string">'xri://+i-service*(+forwarding)*($v*1.0)'</tt> </tt>
<tt class="py-lineno">10</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicetype_enc</tt> <tt class="py-op">=</tt> <tt class="py-string">'xri%3A%2F%2F%2Bi-service%2A%28%2Bforwarding%29%2A%28%24v%2A1.0%29'</tt> </tt>
</div><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">12</tt>  <tt class="py-line"> </tt>
<a name="ProxyQueryTestCase.test_proxy_url"></a><div id="ProxyQueryTestCase.test_proxy_url-def"><tt class="py-lineno">13</tt> <a class="py-toggle" href="#" id="ProxyQueryTestCase.test_proxy_url-toggle" onclick="return toggle('ProxyQueryTestCase.test_proxy_url');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.test_xrires.ProxyQueryTestCase-class.html#test_proxy_url">test_proxy_url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ProxyQueryTestCase.test_proxy_url-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ProxyQueryTestCase.test_proxy_url-expanded"><tt class="py-lineno">14</tt>  <tt class="py-line">        <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicetype</tt> </tt>
<tt class="py-lineno">15</tt>  <tt class="py-line">        <tt class="py-name">ste</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicetype_enc</tt> </tt>
<tt class="py-lineno">16</tt>  <tt class="py-line">        <tt class="py-name">args_esc</tt> <tt class="py-op">=</tt> <tt class="py-string">"_xrd_r=application%2Fxrds%2Bxml&amp;_xrd_t="</tt> <tt class="py-op">+</tt> <tt class="py-name">ste</tt> </tt>
<tt class="py-lineno">17</tt>  <tt class="py-line">        <tt class="py-name">pqu</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method yadis.xrires.ProxyResolver.queryURL()=yadis.xrires.ProxyResolver-class.html#queryURL"><a title="yadis.xrires.ProxyResolver.queryURL" class="py-name" href="#" onclick="return doclink('link-4', 'queryURL', 'link-4');">queryURL</a></tt></tt> </tt>
<tt class="py-lineno">18</tt>  <tt class="py-line">        <tt class="py-name">h</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy_url</tt> </tt>
<tt class="py-lineno">19</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo?'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo'</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">20</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo/bar?baz&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> </tt>
<tt class="py-lineno">21</tt>  <tt class="py-line">                             <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo/bar?baz'</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo/bar?baz=quux&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> </tt>
<tt class="py-lineno">23</tt>  <tt class="py-line">                             <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo/bar?baz=quux'</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">24</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo/bar?mi=fa&amp;so=la&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> </tt>
<tt class="py-lineno">25</tt>  <tt class="py-line">                             <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo/bar?mi=fa&amp;so=la'</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">27</tt>  <tt class="py-line">        <tt class="py-comment"># With no service endpoint selection.</tt> </tt>
<tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">args_esc</tt> <tt class="py-op">=</tt> <tt class="py-string">"_xrd_r=application%2Fxrds%2Bxml%3Bsep%3Dfalse"</tt> </tt>
<tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo?'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno">30</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno">31</tt>  <tt class="py-line"> </tt>
<a name="ProxyQueryTestCase.test_proxy_url_qmarks"></a><div id="ProxyQueryTestCase.test_proxy_url_qmarks-def"><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="ProxyQueryTestCase.test_proxy_url_qmarks-toggle" onclick="return toggle('ProxyQueryTestCase.test_proxy_url_qmarks');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="yadis.test.test_xrires.ProxyQueryTestCase-class.html#test_proxy_url_qmarks">test_proxy_url_qmarks</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ProxyQueryTestCase.test_proxy_url_qmarks-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ProxyQueryTestCase.test_proxy_url_qmarks-expanded"><tt class="py-lineno">33</tt>  <tt class="py-line">        <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicetype</tt> </tt>
<tt class="py-lineno">34</tt>  <tt class="py-line">        <tt class="py-name">ste</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicetype_enc</tt> </tt>
<tt class="py-lineno">35</tt>  <tt class="py-line">        <tt class="py-name">args_esc</tt> <tt class="py-op">=</tt> <tt class="py-string">"_xrd_r=application%2Fxrds%2Bxml&amp;_xrd_t="</tt> <tt class="py-op">+</tt> <tt class="py-name">ste</tt> </tt>
<tt class="py-lineno">36</tt>  <tt class="py-line">        <tt class="py-name">pqu</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="yadis.xrires.ProxyResolver.queryURL" class="py-name" href="#" onclick="return doclink('link-5', 'queryURL', 'link-4');">queryURL</a></tt></tt> </tt>
<tt class="py-lineno">37</tt>  <tt class="py-line">        <tt class="py-name">h</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">proxy_url</tt> </tt>
<tt class="py-lineno">38</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo/bar??'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo/bar?'</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">failUnlessEqual</tt><tt class="py-op">(</tt><tt class="py-name">h</tt> <tt class="py-op">+</tt> <tt class="py-string">'=foo/bar????'</tt> <tt class="py-op">+</tt> <tt class="py-name">args_esc</tt><tt class="py-op">,</tt> </tt>
<tt class="py-lineno">40</tt>  <tt class="py-line">                             <tt class="py-name">pqu</tt><tt class="py-op">(</tt><tt class="py-string">'=foo/bar???'</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><tt class="py-lineno">41</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="yadis-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.openidenabled.com/yadis/">Python-Yadis</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Fri Dec  8 13:17:18 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
